package com.baohua.service;

import java.io.IOException;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.baohua.exception.BaohuaSystemException;
import com.baohua.model.InStore;
import com.baohua.model.Staff;

public interface InStoreService {
	
	/**
	 * 增加采购/领料单数据
	 * @param status   出库/入库状态
	 * @param inStoreNO  采购单号/领料单号
	 * @param warehousingDate 出库/入库时间
	 * @param staffNO 经办人编号
	 * @param memo 备注说明
	 * @param arr_no 采购明细/领料明细中的物料编码所组成的字符串, eg：1, 2, 3
	 * @param arr_amount 采购明细/领料明细中数量所组成的字符串, eg：1, 2, 3
	 * @throws ParseException
	 * @throws BaohuaSystemException
	 */
	 public void  addInStore(String status, String inStoreNO, String warehousingDate, 
			 String staffNO, String memo, String arr_no, String arr_amount) throws ParseException, BaohuaSystemException;
	   
	 /**
	  * 根据出库/入库ID进行删除
	  * @param id
	  * @throws BaohuaSystemException
	  */
	 public void deleteInStore(int id) throws BaohuaSystemException;
		
	 /**
	  * 根据条件查询出库/入库数据
	  * @param instore  出库/入库对象
	  * @param pre_warehousingDate 前置出库/入库日期
	  * @param af_warehousingDate 后置出库/入库日期
	  * @param pre_warehousingAmount 前置总额
	  * @param af_warehousingAmount 后置总额
	  * @param status  出库/入库状态
	  * @param staffNO 员工编号
	  * @param page  
	  * @param pagesize
	  * @return
	  * @throws ParseException
	  */
	 public Map queryInStore(InStore instore, String pre_warehousingDate, String af_warehousingDate,
			 String pre_warehousingAmount, String af_warehousingAmount, String status,
			 String staffNO, int page, int pagesize) throws ParseException;
	 
	 /**
	  * 根据出库/入库Id查询数据
	  * @param id
	  * @return
	  */
	 public InStore queryInStoreById(int id);
	 
		/**
		 * 导出数据/模板
		 * @param output 缓存输出流
		 * @param file 导出文件
		 * @param list 导出数据
		 * @param sheetName 工作薄的名字
		 * @param HttpServletRequest request Request对象
		 * @param HttpServletResponse response Response对象
		 * @throws IllegalArgumentException
		 * @throws IOException
		 * @throws IllegalAccessException
		 */
		public void exportData(String fileName, List list, String sheetName, 
				 HttpServletRequest request, HttpServletResponse response)
						 throws IllegalArgumentException, 
				 IOException, IllegalAccessException;

		/**
		 * 根据出库/入库Id的数组, 查询出入库列表
		 * @param instoreIds
		 * @return
		 */
		public List<InStore> queryByInstoreIds(String[] instoreIds);
}
